<?php

namespace app\common\business;

use app\model\GoodsModel;

class Goods
{
    public $modObj = null;

    public function __construct()
    {
        $this->modObj = new GoodsModel();
    }

    public function getById($id)
    {
        return $this->modObj->getById($id, 'id,stock');
    }

    public function decrById($id, $field, $num = 1)
    {
        return $this->modObj->decrById($id, $field, $num);
    }
}